package com.tengju.data.domain.model.cdc;

import com.tengju.data.domain.shared.DomainEvent;
import lombok.Data;

import java.util.List;
import java.util.Map;
import java.util.Objects;

@Data
public class CDCEvent implements DomainEvent<CDCEvent> {

    private Long id;
    private List<Map<String, String>> data;
    private List<Map<String, String>> old;
    private String table;
    private Long eventTs;



    @Override
    public boolean sameEventAs(CDCEvent other) {
        return Objects.equals(id,other.getId());
    }
}
